package com.hibernate.hrm.entity.dto.position;

import jakarta.validation.constraints.*;
import lombok.Data;
import java.math.BigDecimal;

@Data
public class PositionAddDTO {
    @NotBlank(message = "职位名称不能为空")
    @Size(max = 50, message = "职位名称不能超过50个字符")
    private String positionName;

    @NotBlank(message = "职位代码不能为空")
    @Size(max = 20, message = "职位代码不能超过20个字符")
    @Pattern(regexp = "^[a-zA-Z0-9_-]+$", message = "职位代码只能包含字母、数字、下划线和横线")
    private String positionCode;

    @NotNull(message = "所属部门不能为空")
    private Integer departmentId;

    @NotNull(message = "职位角色不能为空")
    private Integer positionRoleId;

    @Min(value = 1, message = "最大人数必须大于0")
    private Integer maxHeadCount;

    @DecimalMin(value = "0.0", message = "基本工资不能小于0")
    private BigDecimal baseSalary;

    @DecimalMin(value = "0.0", message = "津贴不能小于0")
    private BigDecimal allowance;

    @DecimalMin(value = "0.0", message = "年假天数不能小于0")
    private BigDecimal annualLeaveDays;
}
